namespace CodeConsult.Nordic.nRF8001.ApplicationControlInterface.Commands.SystemCommands
{
    public class ConnectCommand : AciCommandBase
    {
        public const byte OpCode = 0x0F;

        public ushort Timeout { get; set; }
        public ushort AdvInterval { get; set; }

        protected override void EncodeBuffer()
        {
            EncodeBufferWithCommandHeader(OpCode, 4);
            EncodeHelper.SetUnsignedShort(Timeout, EncodeHelper.ByteOrder.LsbMsb);
            EncodeHelper.SetUnsignedShort(AdvInterval, EncodeHelper.ByteOrder.LsbMsb);
        }
    }
}
